package Message.Login
{
    import Engine.RMI.*;
    import Framework.Serialize.*;
    import Framework.Util.*;

    public class AMI_ILogin_login extends RMIObject
    {

        public function AMI_ILogin_login(success:Function = null, exception:Function = null, userObject:Object = null)
        {
            super(success, exception);
            userObject = userObject;
            callFunction = "login";
        }

        override public function __response(stream:SerializeStream) : void
        {
            var sReturn:SLoginReturn;
            var __is:* = stream;
            try
            {
                sReturn = new SLoginReturn();
                sReturn.__read(__is);
            }
            catch (__ex:Error)
            {
                cdeException(new Exception("ExceptionCodeSerialize", Exception.ExceptionCodeSerialize));
                
            }
            this.cdeResponse(sReturn);
        }

        public function cdeResponse(loginReturn:SLoginReturn) : void
        {
            if (_response != null)
            {
                _response.call(null, this, loginReturn);
            }
        }
    }
}
